package com.gougou.manager.web.controller;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.gougou.manager.pojo.TbItemDesc;
import com.gougou.manager.service.MPTbItemDescService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 商品描述表 前端控制器
 * </p>
 *
 * @author ${author}
 * @since 2018-09-07
 */
@RestController
@RequestMapping("/tbItemDesc")
public class TbItemDescController {
    @Autowired
    private MPTbItemDescService itemDescService;

    @RequestMapping("/selectItemDesc/{id}")
    public TbItemDesc selectItemDescByid(@PathVariable int id){
        try {
            EntityWrapper<TbItemDesc> wrapper = new EntityWrapper<TbItemDesc>();
            wrapper.where("item_id={0}",id);

            return itemDescService.selectOne(wrapper);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

}

